<script>
function a()
{
	//b( function(){alert(1);alert(b.k);} );
	var nb = new b( function(){alert(1); alert(b.k);} );
	nb.doIt();
	alert(nb.k);
}

function b( /*Function*/ f )
{
	f();
}
b.prototype.k = 10;
b.prototype.doIt = function(){alert(2)};
a();
</script>